<script type="text/javascript" src="js/jquery.lightbox-0.5.js"></script>
<link rel="stylesheet" type="text/css" href="css/jquery.lightbox-0.5.css" media="screen" />
<script type="text/javascript">
    $(function() {
        $('#gallery a').lightBox();
    });
    </script>
<?php
	loadClass('wallpaper');
	$obj=new Wallpaper();
	$obj->loadByKey($id);
	$size=new Size();
	$data=$size->getTable(" WHERE WallpaperID = ".$obj->WallpaperID." Order By SizeID");
?>
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td background="img/tieude/td_bg.jpg" height="20"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                          <td width="3%"><img src="img/tieude/td_5.jpg" width="110" height="20"></td>
                          <td width="97%" style="padding-left:10px;">&nbsp;</td>
                        </tr>
                      </table></td>
                    </tr>
                    <tr>
                      <td height="25" bgcolor="#191919" style="padding-left:20px;">&nbsp;</td>
                    </tr>
                    <tr>
                      <td valign="top" style="background-position:top; background-repeat:repeat-x; padding-top:15px; padding-bottom:15px; padding-left:15px; padding-right:15px;"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                          <td width="100%" colspan="2"><span class="news_detail_tieude"><?php echo $obj->WallpaperName?></span></td>
                        </tr>
                        <tr>
                          <td colspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="3" id="gallery">
<?php
	for($i=0;$i<count($data);)
	{
?>
                            <tr>
                              <td colspan="5">&nbsp;</td>
                            </tr>
                            <tr>
<?php
		for($j=0;$j<5 && $i<count($data);$j++)
		{
?>
                              <td width="20%" align="center"><a href="cms/<?php echo $obj->Direc.$data[$i]['Image']?>"><img src="cms/<?php echo $obj->Direc."thumbs100/".$data[$i]['Image']?>" width="132" border="0"></a></td>
<?php
			$i++;
		}
?>

                            </tr>
<?php
	}
?>
                            </table></td>
                        </tr>
                        </table></td>
                    </tr>
                    <tr>
                      <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                          <td height="24" background="img/tinkhac_bg.gif" class="main_news_tieude" style="padding-top:5px; padding-left:19px;">NHỮNG HÌNH ẢNH KHÁC</td>
                        </tr>
                        <tr>
                          <td style="padding-bottom:19px; padding-left:19px; padding-right:19px; padding-top:19px;">
<?php
	
	$data = $obj->getTable(" WHERE WallpaperID <> $id");
	$paging=true;
	$display=9;
	include('wallpapergrid.php');
?>
                          </td>
                        </tr>
                      </table></td>
                    </tr>
                  </table>